package com.yj.cmp.sdk.fusioncompute.compute.vm.vo;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class VmVo {

    @SerializedName("autoBoot")
    private boolean autoBoot = false;

    @SerializedName("occupiedVm")
    private boolean occupiedVm = false;

    @SerializedName("occupiedVm")
    private String extemalUuid;

    @SerializedName("securityGroupSet")
    private String securityGroupSet;

    @SerializedName("parentObjUrn")
    private String parentObjUrn;

    @SerializedName("resourceGroup")
    private String resourceGroup;

    @SerializedName("floppyFile")
    private String floppyFile;

    @SerializedName("floppyProtocol")
    private String floppyProtocol;


    @SerializedName("additionalStatus")
    private List<?> additionalStatus;
    @SerializedName("cdRomStatus")
    private String cdRomStatus;
    @SerializedName("clusterName")
    private String clusterName;
    @SerializedName("clusterUrn")
    private String clusterUrn;
    @SerializedName("createTime")
    private String createTime;
    @SerializedName("customProperties")
    private CustomPropertiesDTO customProperties;
    @SerializedName("dataStoreUrns")
    private List<String> dataStoreUrns;
    @SerializedName("description")
    private String description;
    @SerializedName("drStatus")
    private Integer drStatus;
    @SerializedName("floppyStatus")
    private String floppyStatus;
    @SerializedName("group")
    private String group;
    @SerializedName("haConfig")
    private HaConfigDTO haConfig;
    @SerializedName("hostName")
    private String hostName;
    @SerializedName("hostUrn")
    private String hostUrn;
    @SerializedName("idle")
    private Integer idle;
    @SerializedName("initSyncStatus")
    private Integer initSyncStatus;
    @SerializedName("isBindingHost")
    private Boolean isBindingHost;
    @SerializedName("isLinkClone")
    private Boolean isLinkClone;
    @SerializedName("isMultiDiskSpeedup")
    private Boolean isMultiDiskSpeedup;
    @SerializedName("isTemplate")
    private Boolean isTemplate;
    @SerializedName("location")
    private String location;
    @SerializedName("locationName")
    private String locationName;
    @SerializedName("name")
    private String name;
    @SerializedName("objectPrivs")
    private List<?> objectPrivs;
    @SerializedName("osOptions")
    private OsOptionsDTO osOptions;
    @SerializedName("params")
    private ParamsDTO params;
    @SerializedName("pvDriverStatus")
    private String pvDriverStatus;
    @SerializedName("rpoStatus")
    private Integer rpoStatus;
    @SerializedName("status")
    private String status;
    @SerializedName("toolInstallStatus")
    private String toolInstallStatus;
    @SerializedName("toolsVersion")
    private String toolsVersion;
    @SerializedName("uri")
    private String uri;
    @SerializedName("urn")
    private String urn;
    @SerializedName("uuid")
    private String uuid;
    @SerializedName("vmConfig")
    private VmConfigDTO vmConfig;
    @SerializedName("vmRebootConfig")
    private VmRebootConfigDTO vmRebootConfig;
    @SerializedName("vmType")
    private Integer vmType;
    @SerializedName("vncAcessInfo")
    private VncAcessInfoDTO vncAcessInfo;

    @NoArgsConstructor
    @Data
    public static class CustomPropertiesDTO {
    }

    @NoArgsConstructor
    @Data
    public static class HaConfigDTO {
        @SerializedName("hostFaultPolicy")
        private Integer hostFaultPolicy;
        @SerializedName("vmFaultPolicy")
        private Integer vmFaultPolicy;
    }

    @NoArgsConstructor
    @Data
    public static class OsOptionsDTO {
        @SerializedName("osType")
        private String osType;
        @SerializedName("osVersion")
        private Integer osVersion;
    }

    @NoArgsConstructor
    @Data
    public static class ParamsDTO {
        @SerializedName("externalUuid")
        private String externalUuid;
        @SerializedName("vmSubStatus")
        private String vmSubStatus;
        @SerializedName("parentObjUrn")
        private String parentObjUrn;
        @SerializedName("PCI_IB_CARD")
        private String pciIbCard;
    }

    @NoArgsConstructor
    @Data
    public static class VmConfigDTO {
        @SerializedName("cpu")
        private CpuDTO cpu;
        @SerializedName("disks")
        private List<DisksDTO> disks;
        @SerializedName("graphicsCard")
        private GraphicsCardDTO graphicsCard;
        @SerializedName("memory")
        private MemoryDTO memory;
        @SerializedName("nics")
        private List<NicsDTO> nics;
        @SerializedName("numaNodes")
        private Integer numaNodes;
        @SerializedName("pcis")
        private List<?> pcis;
        @SerializedName("properties")
        private PropertiesDTO properties;
        @SerializedName("usb")
        private List<UsbDTO> usb;

        @NoArgsConstructor
        @Data
        public static class CpuDTO {
            @SerializedName("coresPerSocket")
            private Integer coresPerSocket;
            @SerializedName("cpuBindType")
            private String cpuBindType;
            @SerializedName("cpuHotPlug")
            private Integer cpuHotPlug;
            @SerializedName("cpuPolicy")
            private String cpuPolicy;
            @SerializedName("cpuThreadPolicy")
            private String cpuThreadPolicy;
            @SerializedName("limit")
            private Integer limit;
            @SerializedName("quantity")
            private Integer quantity;
            @SerializedName("reservation")
            private Integer reservation;
            @SerializedName("weight")
            private Integer weight;
        }

        @NoArgsConstructor
        @Data
        public static class GraphicsCardDTO {
            @SerializedName("size")
            private Integer size;
            @SerializedName("type")
            private String type;
        }

        @NoArgsConstructor
        @Data
        public static class MemoryDTO {
            @SerializedName("hugePage")
            private String hugePage;
            @SerializedName("limit")
            private Integer limit;
            @SerializedName("memHotPlug")
            private Integer memHotPlug;
            @SerializedName("quantityMB")
            private Integer quantityMB;
            @SerializedName("reservation")
            private Integer reservation;
            @SerializedName("weight")
            private Integer weight;
        }

        @NoArgsConstructor
        @Data
        public static class PropertiesDTO {
            @SerializedName("attachType")
            private Boolean attachType;
            @SerializedName("bootFirmware")
            private String bootFirmware;
            @SerializedName("bootFirmwareTime")
            private Integer bootFirmwareTime;
            @SerializedName("bootOption")
            private String bootOption;
            @SerializedName("cdRomBootOrder")
            private Integer cdRomBootOrder;
            @SerializedName("clockMode")
            private String clockMode;
            @SerializedName("consolelog")
            private Integer consolelog;
            @SerializedName("emulatorPin")
            private List<?> emulatorPin;
            @SerializedName("evsAffinity")
            private Boolean evsAffinity;
            @SerializedName("gpuShareType")
            private String gpuShareType;
            @SerializedName("isAutoAdjustNuma")
            private Boolean isAutoAdjustNuma;
            @SerializedName("isAutoUpgrade")
            private Boolean isAutoUpgrade;
            @SerializedName("isEnableFt")
            private Boolean isEnableFt;
            @SerializedName("isEnableMemVol")
            private Boolean isEnableMemVol;
            @SerializedName("isHpet")
            private Boolean isHpet;
            @SerializedName("isReserveResource")
            private Boolean isReserveResource;
            @SerializedName("realtime")
            private Boolean realtime;
            @SerializedName("reoverByHost")
            private Boolean reoverByHost;
            @SerializedName("systemArchitecture")
            private String systemArchitecture;
            @SerializedName("vmFaultProcess")
            private String vmFaultProcess;
            @SerializedName("vmVncKeymapSetting")
            private Integer vmVncKeymapSetting;
        }

        @NoArgsConstructor
        @Data
        public static class DisksDTO {
            @SerializedName("accessMode")
            private Integer accessMode;
            @SerializedName("bootOrder")
            private Integer bootOrder;
            @SerializedName("dataCopy")
            private Boolean dataCopy;
            @SerializedName("datastoreName")
            private String datastoreName;
            @SerializedName("datastoreUrn")
            private String datastoreUrn;
            @SerializedName("devName")
            private String devName;
            @SerializedName("diskName")
            private String diskName;
            @SerializedName("indepDisk")
            private Boolean indepDisk;
            @SerializedName("ioMode")
            private String ioMode;
            @SerializedName("ioWeight")
            private Integer ioWeight;
            @SerializedName("isDataCopy")
            private Boolean isDataCopy;
            @SerializedName("isThin")
            private Boolean isThin;
            @SerializedName("maxReadBytes")
            private Integer maxReadBytes;
            @SerializedName("maxReadRequest")
            private Integer maxReadRequest;
            @SerializedName("maxWriteBytes")
            private Integer maxWriteBytes;
            @SerializedName("maxWriteRequest")
            private Integer maxWriteRequest;
            @SerializedName("pciType")
            private String pciType;
            @SerializedName("persistentDisk")
            private Boolean persistentDisk;
            @SerializedName("quantityGB")
            private Integer quantityGB;
            @SerializedName("sequenceNum")
            private Integer sequenceNum;
            @SerializedName("storageType")
            private String storageType;
            @SerializedName("systemVolume")
            private Boolean systemVolume;
            @SerializedName("thin")
            private Boolean thin;
            @SerializedName("totalRWBytes")
            private Integer totalRWBytes;
            @SerializedName("totalRWRequest")
            private Integer totalRWRequest;
            @SerializedName("type")
            private String type;
            @SerializedName("volType")
            private Integer volType;
            @SerializedName("volumeAttachStatus")
            private String volumeAttachStatus;
            @SerializedName("volumeFormat")
            private String volumeFormat;
            @SerializedName("volumeUrl")
            private String volumeUrl;
            @SerializedName("volumeUrn")
            private String volumeUrn;
            @SerializedName("volumeUuid")
            private String volumeUuid;
        }

        @NoArgsConstructor
        @Data
        public static class NicsDTO {
            @SerializedName("bootOrder")
            private Integer bootOrder;
            @SerializedName("enableSecurityGroup")
            private Boolean enableSecurityGroup;
            @SerializedName("ip")
            private String ip;
            @SerializedName("ipList")
            private String ipList;
            @SerializedName("ips6")
            private List<?> ips6;
            @SerializedName("mac")
            private String mac;
            @SerializedName("name")
            private String name;
            @SerializedName("nicConfig")
            private NicConfigDTO nicConfig;
            @SerializedName("nicType")
            private Integer nicType;
            @SerializedName("portGroupName")
            private String portGroupName;
            @SerializedName("portGroupUrn")
            private String portGroupUrn;
            @SerializedName("portId")
            private String portId;
            @SerializedName("securityGroupName")
            private String securityGroupName;
            @SerializedName("sequenceNum")
            private Integer sequenceNum;
            @SerializedName("status")
            private String status;
            @SerializedName("uri")
            private String uri;
            @SerializedName("urn")
            private String urn;
            @SerializedName("virtIo")
            private Integer virtIo;

            @NoArgsConstructor
            @Data
            public static class NicConfigDTO {
                @SerializedName("vringbuf")
                private Integer vringbuf;
                @SerializedName("queues")
                private Integer queues;
            }
        }

        @NoArgsConstructor
        @Data
        public static class UsbDTO {
            @SerializedName("controllerType")
            private String controllerType;
            @SerializedName("device")
            private List<?> device;
        }
    }

    @NoArgsConstructor
    @Data
    public static class VmRebootConfigDTO {
        @SerializedName("cpu")
        private CpuDTO cpu;
        @SerializedName("memory")
        private MemoryDTO memory;

        @NoArgsConstructor
        @Data
        public static class CpuDTO {
            @SerializedName("coresPerSocket")
            private Integer coresPerSocket;
            @SerializedName("limit")
            private Integer limit;
            @SerializedName("quantity")
            private Integer quantity;
            @SerializedName("reservation")
            private Integer reservation;
            @SerializedName("weight")
            private Integer weight;
        }

        @NoArgsConstructor
        @Data
        public static class MemoryDTO {
            @SerializedName("limit")
            private Integer limit;
            @SerializedName("quantityMB")
            private Integer quantityMB;
            @SerializedName("reservation")
            private Integer reservation;
            @SerializedName("weight")
            private Integer weight;
        }
    }

    @NoArgsConstructor
    @Data
    public static class VncAcessInfoDTO {
        @SerializedName("vncPassword")
        private String vncPassword;
        @SerializedName("vncPort")
        private Integer vncPort;
    }
}